2013-04-23-5768.200-Spec-BI Inventory Extraction Logic #SDMiscellaneousReports #ABAPEXTRACT

SPECIFICATIONS

-5768.200 BI Inventory Extract Logic


Purpose


Technical Documentation BI Inventory Extraction Function Module Logic

Admin Info


Purpose
Technical Documentation BI Inventory Extraction Function Module Logic
Requested By
Ashwin Kucheriya
Spec Created By
Venkat Kondapally
Spec Created Date
04/23/2013
Spec QA by
Venkat Kondapally
Objects
FUnction Modules:ZBI_GENERIC_INVEXT,
ZBI_INVEXT_BI_FM2

ZBI_INVEXT_BI_FM
Document Status
Completed

Solution Summary


[Discuss this section with Requester and get approval prior to beginning work]

The function module "ZBI_GENERIC_INVEXT" is used to extract Inventory data from ECC. This Function Module is run on a daily basis.
The Function module calls two internal Function Modules,

1) ZBI_INVEXT_BI_FM2
2) ZBI_INVEXT_BI_FM

Solution Details


[Provide complete technical details for configuration or programming here]

Technical documentation :


ZBI_GENERIC_INVEXT: Generic Extract for inventory for BI

Input parameters:


TABLES Parameters

Logic 1: Inventory Data:
If ZCHK = 'X'. (Selection Criteria)
If ZCHK is blank or not equal to ‘X’.
NOTE: Logic for above two documents are explained in a separate cover

Logic 2: UPC Numbers
For all records from inventory data (logic 1),

Logic 3: Season and Collection
For all records from inventory data (logic 1),

Logic 4: Standard Price
For all records from inventory data (logic 1),

Logic 5: Material Groups
For all records from inventory data (logic 1),

Logic 6: Condition Records
For all records from inventory data (logic 1),

Logic 7: Plant
For all records from inventory data (logic 1),

Output
  1. Blocked Quantit: Logic 1 – From FM ZBI_INVEXT_BI_FM2
  2. Quantity on Hand: Logic 1 – From FM ZBI_INVEXT_BI_FM2
  3. RECEIPTS1 (Current Period): Logic 1 – From FM ZBI_INVEXT_BI_FM2
  4. RECEIPTS2 (Second Period): Logic 1 – From FM ZBI_INVEXT_BI_FM2
  5. RECEIPTS3 (Third Period): Logic 1 – From FM ZBI_INVEXT_BI_FM2
  6. INVEN_VALUE: Logic 1 – From FM ZBI_INVEXT_BI_FM2
  7. PRICE: Logic 1 – From FM ZBI_INVEXT_BI_FM2
  8. QTY_HAND_PREV: Logic 1 – From FM ZBI_INVEXT_BI_FM2
  9. INVEN_VALUE_PREV: Logic 1 – From FM ZBI_INVEXT_BI_FM2
  10. AVG_STOCK: Logic 1 – From FM ZBI_INVEXT_BI_FM2
  11. MATNR (Material): Logic 1 – From FM ZBI_INVEXT_BI_FM2
  12. PLANT: Logic 1 – From FM ZBI_INVEXT_BI_FM2
  13. ZCOLOR (Color): Logic 1 – From FM ZBI_INVEXT_BI_FM2
  14. MEINS (Base UOM): Logic 1 – From FM ZBI_INVEXT_BI_FM2
  15. MRP_GRP: Logic 1 – From FM ZBI_INVEXT_BI_FM2
  16. WAERS (Currency Key): Logic 1 – From FM ZBI_INVEXT_BI_FM2
  17. BUKRS (Company Code): Logic 1 – From FM ZBI_INVEXT_BI_FM2
  18. LAST_CON_DATE: Logic 1 – From FM ZBI_INVEXT_BI_FM2
  19. LAST_REC_DATE: Logic 1 – From FM ZBI_INVEXT_BI_FM2
  20. UPC Logic 2 MEAN-EAN11
  21. SEASON: Logic 3 J_3AMSEA-J_3ASEAN
  22. COLLECTIONS: Logic 3 J_3AMSEA-/AFS/COLLECTION
  23. FIRSTPLSH: Logic 7 T001W-J_3ADLDV
  24. LASTPLSH: Logic 7 T001W-J_3ADLDB
  25. ZMATGRP1: Logic 5 MVKE-MVGVR1
  26. ZMATGRP2: Logic 5 MVKE-MVGVR2
  27. ZMATGRP3: Logic 5 MVKE-MVGVR3
  28. ROC_FLAG: Logic 5 MVKE-PRAT2
  29. ZSTDCOST: Logic 4 MBEW-STPRS
  30. QTY_HAND:Logic 1 – From FM ZBI_INVEXT_BI_FM
  31. QTY_ALLOC:Logic 1 – From FM ZBI_INVEXT_BI_FM
  32. QTY_BLOCKED: Logic 1 – From FM ZBI_INVEXT_BI_FM
  33. QTY_ORD: Logic 1 – From FM ZBI_INVEXT_BI_FM
  34. QTY_PO_ORD: Logic 1 – From FM ZBI_INVEXT_BI_FM
  35. QTY_AVAIL: Logic 1 From FM ZBI_INVEXT_BI_FM



Technical documentation :

ZBI_INVEXT_BI_FM2: Process Monthly Inventory Extract

Input Parameter:
TABLES Parameters:
The FM is selected when the input field (WA_ZCHK) is set to X.

LOGIC A: Active Finished Goods Materials

Note: All three tables are joined to fetch data


LOGIC B: Company Code

Logic C: Batch Stock and Sales Order Stock
LOGIC D: Order Data

LOGIC E:
Prod. Order QTY
o Filter Data where delivery is completed
o Filter Data where deletion indicator is set
o Filter Data where AFS Indicator technical completed is set
o Summarize Net SKU Quantity and AFS Delivered Quantity at Material Plant level

PO/STO QTY
o Summarize Net SKU Quantity and AFS Delivered Quantity at Material Plant level

Note: Repeat Logic e for other two fiscal periods


Logic F: Date of Last Consumption and Date of Last Recipient

Logic G: Inventory Value

Logic H: Get Inventory Value for previous period
For eg, If current period is 06/2013, then the last period will be 05/2012






Output:
1. Blocked Quantity: MCHB-CSPEM (Logic C)
2. Quantity on Hand: Total Valuated Stock from (MBEW-LBKUM, Logic G) - Blocked quantity (MCHB-CSPEM (Logic C) + Unrestricted Stock (MSKA)(Logic C) .
3. RECEIPTS1 (Current Period): Net SKU Quantity (J_3ABSSI-J_3AERFMG, Logic E) - AFS Delivered Quantity (J_3ABSSI-J_3AGLMG, Logic E) + Net Quantity (J_3ABSSI-MENGE, Logic E )
4. RECEIPTS2 (Second Period): Net SKU Quantity (J_3ABSSI-J_3AERFMG, Logic E ) - AFS Delivered Quantity (J_3ABSSI-J_3AGLMG, Logic E) + Net Quantity (J_3ABSSI-MENGE, Logic E )
5. RECEIPTS3 (Third Period): Net SKU Quantity (J_3ABSSI-J_3AERFMG, Logic E) - AFS Delivered Quantity (J_3ABSSI-J_3AGLMG, Logic E) + Net Quantity (J_3ABSSI-MENGE, Logic E)
6. INVEN_VALUE: Value of Total Valuated Stock (MBEW-SALK3 Logic G) + Unrestricted Stock ( MSKA-KALAB Logic c ) * Standard Price ( MBEW-STPRS logic G)
7. PRICE: Standard price (MBEW-STPRS Logic G )
8. QTY_HAND_PREV: Logic H
9. INVEN_VALUE_PREV: Value of Total Valuated Stock (MBEWH-SALK3 Logic H) + Unrestricted Stock ( MSKAH-KALAB logic H) * Standard price (MBEWH-STPRS Logic H)
10. AVG_STOCK: Logic H
11. MATNR (Material): MARA-MATNR (Logic A)
12. PLANT: MARC-WERKS (Logic A)
13. ZCOLOR (Color): MARA-J_3ACOL (Logic A)
14. MEINS (Base UOM): MARA-MEINS(Logic A)
15. MRP_GRP: MARC-DISGR (Logic A)
16. WAERS (Currency Key): T001-WAERS (Logic B)
17. BUKRS (Company Code): T001-BUKRS(Logic B)
18. LAST_CON_DATE: S032-LETZTVER (Logic F)
19. LAST_REC_DATE: S032-LETZTVER (Logic F)

Technical documentation : ZBI_INVEXT_BI_FM

ZBI_INVEXT_BI_FM: Process Monthly Inventory Extract


TABLES


The FM is selected when the input field (ZCHK) is blank.


LOGIC I: Active Finished Goods Materials

Note: All three tables are joined to fetch data


Raw Materials

Note: All three tables are joined to fetch data


Logic II: Batch Stock Finished Goods

Raw materials Stock from Storage Location


LOGIC III: Allocation Quantity to Orders



LOGIC IV: Open Order QTY


LOGIC V: PO/STO QTY



Output:

  1. MATNR (Material): MARA-MATNR (Logic I)

  2. PLANT: MARC-WERKS (Logic I)

  3. MEINS (Base UOM): MARA-MEINS(Logic I)

  4. ZCOLOR (Color): MARA-J_3ACOL (Logic I)

  5. J_3ASIZE(Size, Grid Value) MARA- J_3APGEN-J_3AKORDX(Logic I)

  6. QTY_HAND: MCHB-CLAB or MARD-LABST (Raw Material) (logic II)

  7. QTY_ALLOC: J_3ABDBS-MENGE ( Logic III)

  8. QTY_BLOCKED: MCHB-CSPEM or MARD-SPEME (Raw material) (logic II)

  9. QTY_ORD: J_3ABDSI-Menge (logic IV)

  10. QTY_PO_ORD: J_3ABSSI-MENGE (Logic V)

  11. QTY_AVAIL: (QTY_HAND - QTY_BLOCKED ) + QTY_ORD + QTY_ALLOC

  12. MRP_GRP(MRP Group): MARC-DISGR(Logic I)